Private Declare Function GetTextColor Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function SetTextColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
Private Declare Function GetBkMode Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function SetBkMode Lib "gdi32" (ByVal hdc As Long, ByVal nBkMode As Long) As Long
Private Declare Function CreateFont Lib "gdi32" Alias "CreateFontA" (ByVal lfHeight As Long, ByVal lfWidth As Long, ByVal lfEscapement As Long, ByVal lfOrientation As Long, ByVal lfWeight As Long, ByVal lfItalic As Long, ByVal lfUnderline As Long, ByVal lfStrikeOut As Long, ByVal lfCharSet As Long, ByVal lfOutPrecision As Long, ByVal lfClipPrecision As Long, ByVal lfQuality As Long, ByVal lfPitchAndFamily As Long, ByVal lfFaceName As String) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function MulDiv Lib "kernel32" (ByVal nNumber As Long, ByVal nNumerator As Long, ByVal nDenominator As Long) As Long
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
Private Declare Function DrawTextExA Lib "user32" (ByVal hdc As Long, ByVal lpsz As String, ByVal n As Long, lpRect As RECT, ByVal un As Long, lpDrawTextParams As DRAWTEXTPARAMS) As Long
Private Declare Function DrawTextExW Lib "user32" (ByVal hdc As Long, ByVal lpsz As Long, ByVal n As Long, lpRect As RECT, ByVal un As Long, lpDrawTextParams As DRAWTEXTPARAMS) As Long
Dim dthDC As Long
Dim dtSmoothingMode As SmoothingModes
Dim dtMeasureInPexils As Boolean
Dim dtAlign As AlignmentConstants
Dim dtVerticalAlign As TextVerticalAlign
Dim dtEllipsis As TextEllipsis
Dim dtPrefix As PrefixMode
Dim dtWordWrap As Boolean
Dim dtTabStop As Boolean
Dim dtSingleLine As Boolean
Dim dtUseTabWidth As Boolean
Dim dtNoClip As Boolean
Dim dtMultiLine As Boolean
Dim dtRightToLeft As Boolean
Dim dtTabWidth As Long
Dim dtLeftMargin As Long
Dim dtRightMargin As Long
Friend Property Get hdc() As Long
hdc = dthDC
End Property
Friend Property Let hdc(ByVal vNewValue As Long)
dthDC = vNewValue
End Property
Friend Property Get SmoothingMode() As SmoothingModes
SmoothingMode = dtSmoothingMode
End Property
Friend Property Let SmoothingMode(ByVal vNewValue As SmoothingModes)
dtSmoothingMode = vNewValue
End Property
Friend Property Get MeasureInPixels() As Boolean
MeasureInPexils = dtMeasureInPexils
End Property
Friend Property Let MeasureInPexils(ByVal vNewValue As Boolean)
dtMeasureInPexils = vNewValue
End Property
Friend Property Get Align() As AlignmentConstants
Align = dtAlign
End Property
Friend Property Let Align(ByVal vNewValue As AlignmentConstants)
dtAlign = vNewValue
End Property
Friend Property Get VerticalAlign() As TextVerticalAlign
VerticalAlign = dtVerticalAlign
End Property
Friend Property Let VerticalAlign(ByVal vNewValue As TextVerticalAlign)
dtVerticalAlign = vNewValue
End Property
Friend Property Get Ellipsis() As TextEllipsis
Ellipsis = dtEllipsis
End Property
Friend Property Let Ellipsis(ByVal vNewValue As TextEllipsis)
dtEllipsis = vNewValue
End Property
Friend Property Get Prefix() As PrefixMode
Prefix = dtPrefix
End Property
Friend Property Let Prefix(ByVal vNewValue As PrefixMode)
dtPrefix = vNewValue
End Property
Friend Property Get WordWrap() As Boolean
WordWrap = dtWordWrap
End Property
Friend Property Let WordWrap(ByVal vNewValue As Boolean)
dtWordWrap = vNewValue
End Property
Friend Property Get TabStop() As Boolean
TabStop = dtTabStop
End Property
Friend Property Let TabStop(ByVal vNewValue As Boolean)
dtTabStop = vNewValue
End Property
Friend Property Get SingleLine() As Boolean
SingleLine = dtSingleLine
End Property
Friend Property Let SingleLine(ByVal vNewValue As Boolean)
dtSingleLine = vNewValue
End Property
Friend Property Get UseTabWidth() As Boolean
UseTabWidth = dtUseTabWidth
End Property
Friend Property Let UseTabWidth(ByVal vNewValue As Boolean)
dtUseTabWidth = vNewValue
End Property
Friend Property Get NoClip() As Boolean
NoClip = dtNoClip
End Property
Friend Property Let NoClip(ByVal vNewValue As Boolean)
dtNoClip = vNewValue
End Property
Friend Property Get MultiLine() As Boolean
MultiLine = dtMultiLine
End Property
Friend Property Let MultiLine(ByVal vNewValue As Boolean)
dtMultiLine = vNewValue
End Property
Friend Property Get RightToLeft() As Boolean
RightToLeft = dtRightToLeft
End Property
Friend Property Let RightToLeft(ByVal vNewValue As Boolean)
dtRightToLeft = vNewValue
End Property
Friend Property Get TabWidth() As Long
TabWidth = dtTabWidth
End Property
Friend Property Let TabWidth(ByVal vNewValue As Long)
dtTabWidth = vNewValue
End Property
Friend Property Get LeftMargin() As Long
LeftMargin = dtLeftMargin
End Property
Friend Property Let LeftMargin(ByVal vNewValue As Long)
dtLeftMargin = vNewValue
End Property
Friend Property Get RightMargin() As Long
RightMargin = dtRightMargin
End Property
Friend Property Let RightMargin(ByVal vNewValue As Long)
dtRightMargin = vNewValue
End Property
Public Function Draw(ByVal str As String, ByVal X As Long, ByVal Y As Long, ByVal Width As Long, ByVal Height As Long, ByVal Font As StdFont, ByVal FontColor As Long, ByVal FontAngle As Single, ByVal FontTransparent As Boolean, ByVal IsUnicode As Boolean)